<template>
  <!--  <el-descriptions title="社团信息" class="act_information" column="1" v-model="size">-->
  <!--    <el-descriptions-item label="社团名称">{{ club.name }}</el-descriptions-item>-->
  <!--    <el-descriptions-item label="社团介绍">{{ club.clubIntroduce }}</el-descriptions-item>-->
  <!--    <el-descriptions-item label="社团描述">{{ club.clubDescribe }}</el-descriptions-item>-->
  <!--    <el-descriptions-item label="社团状态">-->
  <!--      <el-tag size="small">审核通过</el-tag>-->
  <!--    </el-descriptions-item>-->
  <!--    <el-descriptions-item label="成立时间">{{ getDateTime(club.createTime) }}</el-descriptions-item>-->
  <!--  </el-descriptions>-->
  <div>
    <div class="infor_title">
      <span><h4>社团信息</h4></span>
      </div>
      <el-form label-position="left" inline class="demo-table-expand">
        <el-form-item label="社团名称：">
          <span>{{ club.name }}</span>
        </el-form-item>
        <el-form-item label="社团介绍：">
          <span>{{ club.clubIntroduce }}</span>
        </el-form-item>
        <el-form-item label="社团描述：">
          <span>{{ club.clubDescribe }}</span>
        </el-form-item>
        <el-form-item label="社长：">
          <span>{{ creator }}</span>
        </el-form-item>
        <el-form-item label="社团状态：">
          <span> <el-tag size="small">审核通过</el-tag></span>
        </el-form-item>
        <el-form-item label="成立日期：">
          <span>{{ getDateTime(club.createTime) }}</span>
        </el-form-item>
      </el-form>

<!--      <el-form class="Content">-->
<!--        <el-row>社团名称：{{ club.name }}</el-row>-->
<!--        <el-row>社团介绍：{{ club.clubIntroduce }}</el-row>-->
<!--        <el-row>社团描述：{{ club.clubDescribe }}</el-row>-->
<!--        <el-row>社长：{{ creator }}</el-row>-->
<!--        <el-row>社团状态：-->
<!--          <el-tag size="small">审核通过</el-tag>-->
<!--        </el-row>-->
<!--        <el-row>成立日期：{{ getDateTime(club.createTime) }}</el-row>-->
<!--      </el-form>-->
    <div class="infor_title">
      <span><h4>社团公告</h4></span>
      <div class="Content">{{ club.clubNotice }}</div>
    </div>
<!--    <div class="infor_title">-->
<!--      <span><h4>社团制度</h4></span>-->
<!--      <div class="Content">{{ club.clubNotice }}</div>-->
<!--    </div>-->
  </div>
</template>

<script>
import {getClub} from "../../../../api/club";
import {getDateTime1} from "../../../../utils/dateTimeUtil";
import {getCreator} from "../../../../api/student";

export default {
  name: "ClubInformation",
  data() {
    return {
      size: "small",
      clubId: null,
      club: [],
      creator: null,
      creatorId: null
    }
  },

  created() {
    this.clubId = this.$route.params.id;
    console.log("clubId:", this.clubId)
    this.getClubInformation();

  },
  methods: {
    async getClubInformation() {
      await getClub({
        id: this.clubId
      }).then(res => {
        this.club = res.data;
        this.creatorId = this.club.createUserId;
        console.log("创建人id：", this.club.createUserId)
        this.getCreateUser()
      })
    },
    getCreateUser() {
      getCreator({
        id: this.creatorId
      }).then(res => {
        this.creator = res.data.name;
        console.log("社长：",res)
      })
    },
    getDateTime(val) {
      return getDateTime1(val);
    },
  }
}

</script>

<style scoped>
.infor_title {
  margin: 20px;
}

.el-row {
  margin-top: 15px;
}

.Content {
  /*color: #464b48;*/
  font-size: 14px;
  text-decoration: none;
  margin: 20px;
}

.act_information {
  margin: 20px;

}
/*demotable*/
.demo-table-expand {
  font-size: 0;
  text-decoration: none;
  margin: 20px;
}
.demo-table-expand label {
  width: 90px;
  color: #99a9bf;
}
.demo-table-expand .el-form-item {
  margin-right: 0;
  margin-bottom: 0;
  width: 100%;
}
</style>
